﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;

namespace Mpp.Utility
{
    public class DependencyInjectionContainer
    {
        private DependencyInjectionContainer()
        {

        }

        private static IUnityContainer _instance = null;
        private static Object _lock = new Object();
        public static IUnityContainer UnityContainer
        {
            get
            {
                if (_instance == null)
                {
                    lock (_lock)
                    {
                        _instance = new UnityContainer().LoadConfiguration();
                    }
                }
                return _instance;
            }
        }
    }
}
